package com.qianclass.talklive.app.view.Graffiti;

import android.graphics.Matrix;
import android.graphics.Path;

/**
 * Created by Admin on 2017/3/21.
 */

public class GraffitiPath {

        public GraffitiView.Pen mPen; // 画笔类型
        public GraffitiView.Shape mShape; // 画笔形状
        public float mStrokeWidth; // 大小
        public GraffitiColor mColor; // 颜色
        public Path mPath; // 画笔的路径
        public float mSx, mSy; // 映射后的起始坐标，（手指点击）
        public float mDx, mDy; // 映射后的终止坐标，（手指抬起）
        public Matrix mMatrix; //　仿制图片的偏移矩阵
        public String text; // 文本 文字

        public static GraffitiPath toShape(GraffitiView.Pen pen, GraffitiView.Shape shape, float width, GraffitiColor color,
                                           float sx, float sy, float dx, float dy, Matrix matrix, String text) {
            GraffitiPath path = new GraffitiPath();
            path.mPen = pen;
            path.mShape = shape;
            path.mStrokeWidth = width;
            path.mColor = color;
            path.mSx = sx;
            path.mSy = sy;
            path.mDx = dx;
            path.mDy = dy;
            path.mMatrix = matrix;
            path.text = text;
            return path;
        }

        public static GraffitiPath toPath(GraffitiView.Pen pen, GraffitiView.Shape shape, float width, GraffitiColor color, Path p, Matrix matrix) {
            GraffitiPath path = new GraffitiPath();
            path.mPen = pen;
            path.mShape = shape;
            path.mStrokeWidth = width;
            path.mColor = color;
            path.mPath = p;
            path.mMatrix = matrix;
            return path;
        }

    @Override
    public String toString() {
        return "{" +
                "mPen=" + mPen +
                ", mShape=" + mShape +
                ", mStrokeWidth=" + mStrokeWidth +
                ", mColor=" + mColor +
                ", mPath=" + mPath +
                ", mSx=" + mSx +
                ", mSy=" + mSy +
                ", mDx=" + mDx +
                ", mDy=" + mDy +
                ", mMatrix=" + mMatrix +
                ", text='" + text + '\'' +
                '}';
    }
}
